package com.xiangxiao.rpan.file.consumer.callback;

import com.alibaba.fastjson.JSONObject;
import com.xiangxiao.rpan.file.constant.ResponseCode;
import com.xiangxiao.rpan.file.consumer.IConsumerSettingsClient;
import com.xiangxiao.rpan.file.entity.UpdateViewSetting;
import com.xiangxiao.rpan.file.utils.ReturnUtils;
import org.springframework.stereotype.Component;

/**
 * @auther xiangxiao
 * @email 573768011@qq.com
 * @data 2023/11/29 15:02
 */
@Component
public class SettingsClientCall implements IConsumerSettingsClient {
  @Override
  public JSONObject updateViewSetting(UpdateViewSetting settingRequest) {
    String error = "{\"error\":\"ConsumerSettingsClient updateViewSetting method has error -----rpan-settings\"}";
    return ReturnUtils.getHystrixReturn(String.valueOf(ResponseCode.UPDATE_VIEW_SETTING_FAILED), "调用Settings服务异常，走熔断器", "调用Settings服务【updateViewSetting】异常，走熔断器");
  }
}
